package Java好用的对象.输入输出;

import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Scanner;

/**
 * nextInt() 是等待可以转为数字的字符, 可以自动实现换行
 * nextLine() 是直接换行读取
 */
public class Solution {
    static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
//        test1();
//        test2();;
        test3();
    }

    static void test1(){
        // 5
        // 1 2 3 4 5
        int n = in.nextInt();
        int[] arr = new int[n];
        for(int i=0;i<n;i++){ arr[i] = in.nextInt(); }
        out(arr);
    }

    static void test2(){
        // 5
        // abcde
        int n = in.nextInt();
        in.nextLine();
        String str = in.nextLine();
        System.out.println(str);
    }

    static void test3(){
        // 5 abcde
        String s = in.nextLine();
        String[] split = s.split(" ");
        for (int i = 0; i < split.length; i++) {
            System.out.println(split[i].length());
        }
    }



    static void out (int[] arr){
        StringBuilder sb = new StringBuilder();
        for(int i =0 ;i<arr.length;i++){ sb.append(arr[i] + " ");}
        System.out.println(sb.toString());
    }
}